package com.cda.pes.VO;
import com.cda.pes.pojo.Order;
import com.cda.pes.pojo.OrderItem;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Date;
import java.util.Objects;

public class OrderVO implements Serializable {
    private Order[] order;
    private OrderItem[] orderItem;
    private Long totalPrice;
    private Long allPrice;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        OrderVO orderVO = (OrderVO) o;
        return Arrays.equals(order, orderVO.order) &&
                Arrays.equals(orderItem, orderVO.orderItem) &&
                Objects.equals(totalPrice, orderVO.totalPrice) &&
                Objects.equals(allPrice, orderVO.allPrice);
    }

    @Override
    public int hashCode() {
        int result = Objects.hash(totalPrice, allPrice);
        result = 31 * result + Arrays.hashCode(order);
        result = 31 * result + Arrays.hashCode(orderItem);
        return result;
    }

    @Override
    public String toString() {
        return "OrderVO{" +
                "order=" + Arrays.toString(order) +
                ", orderItem=" + Arrays.toString(orderItem) +
                ", totalPrice=" + totalPrice +
                ", allPrice=" + allPrice +
                '}';
    }

    public Order[] getOrder() {
        return order;
    }

    public void setOrder(Order[] order) {
        this.order = order;
    }

    public OrderItem[] getOrderItem() {
        return orderItem;
    }

    public void setOrderItem(OrderItem[] orderItem) {
        this.orderItem = orderItem;
    }

    public Long getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(Long totalPrice) {
        this.totalPrice = totalPrice;
    }

    public Long getAllPrice() {
        return allPrice;
    }

    public void setAllPrice(Long allPrice) {
        this.allPrice = allPrice;
    }

    public OrderVO(Order[] order, OrderItem[] orderItem, Long totalPrice, Long allPrice) {
        this.order = order;
        this.orderItem = orderItem;
        this.totalPrice = totalPrice;
        this.allPrice = allPrice;
    }

    public OrderVO() {
    }
}
